#pragma once

#ifndef _CNETWORK_H_
#define _CNETWORK_H_

#include "CChar.h"

#define bit(a,b) ((a>>b)&1)

class CNetwork
{
private:
	CNetwork(void);
	~CNetwork(void);

public:
	static int CNetwork::initCommunication(SOCKET * ListenSocket, int protocol , char * port);
	static int CNetwork::makePacketsReadable(char * recvbuf, int recvSize, CChar * schar, struct Settings * s);
};

DWORD WINAPI UDPServ(LPVOID lpParam);
DWORD WINAPI keyComm(LPVOID lpParam);
DWORD WINAPI keyServ(LPVOID lpParam);
DWORD WINAPI LobbyServ(LPVOID lpParam);
DWORD WINAPI LobbyComm(LPVOID lpParam);
DWORD WINAPI PolLobbyComm(LPVOID lpParam);
DWORD WINAPI AccComm(LPVOID lpParam);
DWORD WINAPI AccServ(LPVOID lpParam);
DWORD WINAPI SearchServ(LPVOID lpParam);
DWORD WINAPI SearchComm(LPVOID lpParam);
DWORD WINAPI POLServ(LPVOID lpParam);
DWORD WINAPI POLComm(LPVOID lpParam);
#endif
